package com.acoreful.bootsample.config;

import javax.annotation.PostConstruct;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.style.ToStringCreator;
import org.springframework.stereotype.Component;

@Component
public class AppConfig {
	private Logger logger=LoggerFactory.getLogger(getClass());
	@Value("${app.name:}")
	private String appName;
	@PostConstruct
	public void init() {
		logger.info("*****************************************");
		logger.warn("*****************************************");
		logger.info("{} starting **********",appName);
	}
	
	@Override
	public String toString() {
		return new ToStringCreator(this).toString();
	}
}
